import './App.scss'
import './base.scss'
import NavBar from "./components/NavBar/index.jsx";
import MyMenu from "@/components/MyMenu/index.jsx";
import BottomBar from "@/components/BottomBar/index.jsx";
import FoodList from "@/components/FoodList/index.jsx";
import {ConfigProvider, Flex, Image} from 'antd';
import {useStore} from "@/store/index.jsx";
import {useEffect} from "react";

function App() {

    const {listStore} =useStore()
    //获取食物列表
    const getFoodList =()=>{
        listStore.getList()
    }
  useEffect(()=>{
      getFoodList()
  },[])
    return (
        <ConfigProvider
            theme={{
                token: {
                    // Seed Token，影响范围大
                    colorPrimary: '#f8c531',

                },
            }}
        >
            <div className='container'>


                <NavBar></NavBar>
                <Flex style={{flex:1}}  vertical={false}>
                    <MyMenu></MyMenu>
                    <FoodList></FoodList>

                </Flex>
                <BottomBar></BottomBar>
            </div>

        </ConfigProvider>
    )
}

export default App
